//
//  GXWDemoViewController.swift
//  swift3.0项目开始
//
//  Created by 龚昕炜 on 16/7/28.
//  Copyright © 2016年 龚昕炜. All rights reserved.
//

import UIKit

class GXWDemoViewController: GXWBaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        
        self.navItem.title = "第\(self.navigationController?.childViewControllers.count ?? 0)个"

        view.backgroundColor = UIColor.cyan()
        
        setUpUI()
    }
    
    @objc private func showFriends() {
        navigationController?.pushViewController(GXWDemoViewController(), animated: true)
    }
}

extension GXWDemoViewController {
    
    override func setUpUI() {
        super.setUpUI()
        
        navItem.rightBarButtonItem = UIBarButtonItem.init(title: "下一个", target: self, action: #selector(showFriends))
    }
    
}
